﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Commander.Models.Dashboard.RunModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Smells in Code Summary</h2>
    <table>
        <tr>
            <th>
                Smell Name
            </th>
            <th>
                Problem Description
            </th>
            <th>
                Recommendation
            </th>
            <th>
                Refactor
            </th>
        </tr>
        <% int i = 0;
            foreach (var item in Model.Defects) { %>
        <tr>
            <td>
                <%= item.Rule.Name %>
            </td>
            <td>
                <%= item.Rule.Problem %>
            </td>
            <td>
                <%= item.Rule.Solution %>
            </td>
            <td>            
            <%= Html.ActionLink("Details","SmellDetail", new {Index=i++}) %>       
            </td>

        </tr>
        <%} %>
    </table>

</asp:Content>
